<template>
  <div class="goods_item" @click="toPage">
    <img v-lazy="item.imagePath"/>
    <p>{{item.title}}</p>
  </div>
</template>

<script>
export default {
  name: 'index',
  props:{
    item: Object
  },
  methods:{
    toPage(){
      this.$router.push('/detail/'+1)
    }
  }
}
</script>

<style scoped lang="less">
  .goods_item{
    width: 100%;
    text-align: center;
    border-radius: 5px;
    box-shadow: rgba(0, 0, 0, 0.1) 0 3px 4px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    img{
      width: 100%;
    }
  }
</style>
